package day240512.p;

import day240512.p.MyComparator;
import day240512.p.Student;

public class StudentFirstLetterComparator implements MyComparator {
    @Override
    public int compare(Object o1, Object o2) {
        Student s1 = (Student) o1;
        Student s2 = (Student) o2;
        if (s1.firstletter == s2.firstletter) {
            return 0;
        } else if (s1.firstletter > s2.firstletter) {
            return 1;
        } else {
            return -1;
        }
    }
}
